#include <cstdio>
#include <cstring>

class big_integer {
public:
    int digit[1000];
    int size;

    void init() {
        for (int i = 0; i < 1000; ++i)
            digit[i] = 0;
        size = 0;
    }

    void set_num(char string[]) {
        init();
        int length = strlen(string);
        for (int i = length - 1, count = 0, temp_num = 0, weight = 1; i >= 0; i--) {
            temp_num += (string[i] - '0') * weight;
            count++;
            weight *= 10;
            if (count == 4 || i == 0) {
                digit[size++] = temp_num;
                count = 0;
                temp_num = 0;
                weight = 1;
            }
        }
    }

    void output_num() {
        for (int i = size - 1; i >= 0; i--) {
            if (i != size - 1)
                printf("%04d", digit[i]);
            else
                printf("%d", digit[i]);
        }
        printf("\n");
    }

    big_integer operator+(const big_integer &big_num) const {
        big_integer return_num;
        return_num.init();
        int carry = 0;
        for (int i = 0; i < big_num.size || i < size; ++i) {
            int temp_num = big_num.digit[i] + digit[i] + carry;
            carry = temp_num / 10000;
            temp_num %= 10000;
            return_num.digit[return_num.size++] = temp_num;
        }
        if (carry != 0) {
            return_num.digit[return_num.size++] = carry;
        }
        return return_num;
    }
} num_a, num_b, num_c;

char input_string_a[1001], input_string_b[1001];

int main(int argc, char const *argv[]) {
    while (scanf("%s%s", input_string_a, input_string_b) != EOF) {
        num_a.set_num(input_string_a);
        num_b.set_num(input_string_b);
        num_c = num_a + num_b;
        num_c.output_num();
    }
    return 0;
}